package com.mlnx.work.enums;

import com.mlnx.common.enums.BaseCodeEnum;

public enum ProjectStatusEnum implements BaseCodeEnum<Integer> {
    OVERDUE(1, "已逾期"), TRANSFERING(2, "移交中"), ING(3, "进行中"), RISK(4, "风险项"), DONE_VERIFY(5, "完成待确认"), DONE(6, "完成");

    private Integer code;

    private String status;

    ProjectStatusEnum(Integer code, String status) {
        this.code = code;
        this.status = status;
    }

    @Override
    public Integer getValue() {
        return code;
    }

    public String getStatus() {
        return status;
    }

    public static ProjectStatusEnum valueOf(int code) {
        for (ProjectStatusEnum projectStatusEnum : ProjectStatusEnum.values()) {
            if (projectStatusEnum.code.intValue() == code)
                return projectStatusEnum;
        }

        return null;
    }
}
